package com.uuah.server.transport.retry.policies;

import com.uuah.server.api.transport.retry.IRetryPolicy;
import com.uuah.server.transport.retry.PolicyStatus;

/**
 *
 * TODO comment ...
 *
 * <p>
 * update record:updator，update time，update content and version
 * </p>
 *
 * @author <a href="jonny_quan@hotmail.com">jonny</a>
 * @date 2009 2009-3-27 下午02:47:58
 * @version 1.0.0
 */
public class NoRetryPolicyTemplate extends AbstractPolicyTemplate {
	public IRetryPolicy createRetryInstance() {
		return new NoRetryPolicy();
	}

	protected static class NoRetryPolicy implements IRetryPolicy {
		public PolicyStatus applyPolicy(Throwable cause) {
			return PolicyStatus.policyExhausted(cause);
		}
	}

	// @Override
	public boolean isRetryEnabled() {
		return false;
	}

	public String toString() {
		return "NoRetryPolicy{}";
	}
}
